<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
    <jsp:include page="/common/meta.jsp"/>
    <jsp:include page="/common/resource.jsp"/>
    <script type="text/javascript" src="${pageContext.request.contextPath}/common/js/listPageMaster.js"></script>
</head>
<script type="text/javascript">
    gridDataUrl = "${pageContext.request.contextPath}/themes/kit_admin/table.json";
    var row ;
    /**  初始化layui table*/
    layui.use(['table','layer'], function () {
        var table = layui.table;
        var layer = layui.layer;
        row = table.checkStatus('laytable');
      //监听工具条
        table.on('checkbox(laytable)', function(obj){ //注：tool是工具条事件名，test是table原始容器的属性 lay-filter="对应的值"
         	alert("点击事件");
          var data = obj.data; //获得当前行数据
          row = data;
          alert(data.id);
          var layEvent = obj.event; //获得 lay-event 对应的值（也可以是表头的 event 参数对应的值）
          var tr = obj.tr; //获得当前行 tr 的DOM对象
         
          if(layEvent === 'detail'){ //查看
            //do somehing
          } else if(layEvent === 'del'){ //删除
            layer.confirm('真的删除行么', function(index){
              obj.del(); //删除对应行（tr）的DOM结构，并更新缓存
              layer.close(index);
              //向服务端发送删除指令
            });
          } else if(layEvent === 'edit'){ //编辑
            //do something
            
            //同步更新缓存对应的值
            obj.update({
              username: '123'
              ,title: 'xxx'
            });
          }
        });
    });
    
function serach (){
	debugger;
	layer.msg('hello');
		 alert(row.id);
	 	layer.msg('hello');
	
}
 
</script>
<body>
<!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->

<div class="layui-fluid">
    <!-- 引用查询条件页面-->
    <jsp:include page="vo/conditionVO.jsp"/>
    <!-- 应用table页面-->
    <jsp:include page="page/listComponent.jsp"/>
</div>
</body>
</html>